package com.srit.vgt.dao;

import com.srit.vgt.common.parent.ParentDao;
import com.srit.vgt.entity.GyRetailMarketTranSumm;
import org.springframework.data.jpa.repository.Query;

import java.util.Date;

public interface GyRetailMarketTranSummDao extends ParentDao<GyRetailMarketTranSumm, Integer> {

    @Query(nativeQuery = true, value = "select  count(0) from gy_retail_market_tran_summ where to_days(in_date) = to_days(CURDATE()) - 1")
    int getTranNum();


    @Query(nativeQuery = true, value = "select  sum(price) from gy_retail_market_tran_summ where to_days(in_date) = to_days(CURDATE()) - 1")
    Double getTranPrice();


}
